<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>CMS Admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	body{ padding-top:30px;}
	fieldset{ width:400px; height:200px; margin-top: 20px;margin-right: auto;margin-left: auto; color:#808080;}
	legend{ padding:3px; font-weight:bold;}
       #loginTable{margin-right: auto;margin-left: auto; margin-top:10px;}
       .loginTxt{ width:160px;} 
       #copyright
       {
           font: 12px Arial,Helvetica,sans-serif;
           color: #767676;
           text-align: center;
           margin-top: 50px;
           padding: 10px 0px;
       }
</style>
<script src="/js/jquery-1.5.1.min.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function () {
		$("#userid").focus();
	});
	function VerifyPage(){
		if($("#userid").val() == ''){
			alert('用户名不能为空!');
			return false;
		}
		if($("#txtVC").val() == ''){
			alert('请输入验证码!');
			return false;
		}
		return true;
	}
	function changeVCImg(){
		var num = 	new Date().getTime();
		var rand = Math.round(Math.random() * 10000);
		num = num + rand;
		var surl = "/cms/drawVC/" + num;
		$("#vcimg").attr("src",surl);
	}
</script>
</head>
<body>
<fieldset >
	<legend>CMS Admin V3</legend>
	<form action="<?=site_url('login/dologin')?>" method="post" accept-charset="utf-8" name="myform" onsubmit="return VerifyPage()">
      <input type="hidden" name="dopost" value="login" />
      <input name='adminstyle' type='hidden' value='newdedecms' />
        <table id="loginTable" cellpadding="5" border="0">
            <tr>
                <td align="right">用户名</td>
                <td><input type="text" class="loginTxt" name="userid" id="userid" />
                </td>
            </tr>
            <tr>
                <td align="right">密码</td>
                <td><input type="password" class="loginTxt" name="pwd" id="pwd" /></td>
            </tr>
			<tr>
				<td>校验码</td>
				<td>
				
	   <input id="txtVC" type="text" name="txtVC" style="text-transform:uppercase;"/><img id="vcimg" src="<?=site_url('/login/drawVC');?>" onClick="changeVCImg()" style="cursor: pointer;" alt="看不清？点击更换" title="看不清？点击更换" />
		</td>
			</tr>
            <tr>
                <td>
                </td>
                <td>
                    <button type="submit" name="sm1" class="login-btn" onclick="this.form.submit();">登录</button>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td style="color:#ff0000;"><?=$tip?>
                </td>
            </tr>
        </table></form>
		</fieldset>
    <div id="copyright">
        &copy; 2011 Mountain Inc, all rights reserved
    </div>

</body>
</html>
